package cloud.xiangyixiang.www.spring.boot.java.basics.annotations;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * Hero
 * </p>
 *
 * @author weixin
 * @date 2023/9/7 14:37
 */
public class Hero {

    /**
     * 不推荐使用方法 @Deprecated 注解
     */
    @Deprecated
    public void say(){
        System.out.println("nothing has to say!");
    }
    public void speak(){
        System.out.println("i have a dream!");
    }

    public void  addItems(String item){
        List items =  new ArrayList();
        items.add(item);
        System.out.println("i am "+items);
    }

}
